package b.g.b.h.l;

import b.g.b.h.d;
import b.g.b.h.e;
import java.util.ArrayList;

/* compiled from: BasicMeasure */
public class b {
    public final ArrayList<d> a = new ArrayList();
    public a b = new a();
    public e c;

    /* compiled from: BasicMeasure */
    public static class a {
        public b.g.b.h.d.a a;
        public b.g.b.h.d.a b;
        public int c;
        public int d;
        public int e;
        public int f;
        public int g;
        public boolean h;
        public boolean i;
        public int j;
    }

    /* compiled from: BasicMeasure */
    public interface b {
    }

    public b(e eVar) {
        this.c = eVar;
    }

    public final boolean a(b bVar, d dVar, int i) {
        b.g.b.h.d.a aVar = b.g.b.h.d.a.FIXED;
        this.b.a = dVar.m();
        this.b.b = dVar.q();
        this.b.c = dVar.r();
        this.b.d = dVar.l();
        a aVar2 = this.b;
        aVar2.i = false;
        aVar2.j = i;
        b.g.b.h.d.a aVar3 = aVar2.a;
        b.g.b.h.d.a aVar4 = b.g.b.h.d.a.MATCH_CONSTRAINT;
        Object obj = aVar3 == aVar4 ? 1 : null;
        Object obj2 = aVar2.b == aVar4 ? 1 : null;
        obj = (obj == null || dVar.S <= 0.0f) ? null : 1;
        obj2 = (obj2 == null || dVar.S <= 0.0f) ? null : 1;
        if (obj != null && dVar.n[0] == 4) {
            aVar2.a = aVar;
        }
        if (obj2 != null && dVar.n[1] == 4) {
            aVar2.b = aVar;
        }
        ((androidx.constraintlayout.widget.ConstraintLayout.a) bVar).b(dVar, aVar2);
        dVar.M(this.b.e);
        dVar.H(this.b.f);
        a aVar5 = this.b;
        dVar.y = aVar5.h;
        dVar.E(aVar5.g);
        aVar5 = this.b;
        aVar5.j = 0;
        return aVar5.i;
    }

    public final void b(e eVar, int i, int i2) {
        int i3 = eVar.X;
        int i4 = eVar.Y;
        eVar.K(0);
        eVar.J(0);
        eVar.Q = i;
        int i5 = eVar.X;
        if (i < i5) {
            eVar.Q = i5;
        }
        eVar.R = i2;
        i = eVar.Y;
        if (i2 < i) {
            eVar.R = i;
        }
        eVar.K(i3);
        eVar.J(i4);
        this.c.P();
    }

    public void c(e eVar) {
        this.a.clear();
        int size = eVar.l0.size();
        for (int i = 0; i < size; i++) {
            d dVar = (d) eVar.l0.get(i);
            b.g.b.h.d.a m = dVar.m();
            b.g.b.h.d.a aVar = b.g.b.h.d.a.MATCH_CONSTRAINT;
            if (m == aVar || dVar.q() == aVar) {
                this.a.add(dVar);
            }
        }
        eVar.W();
    }
}
